<?php
class GameController extends AppController {
	public $components = array('Game', 'Sudoku2');
	public function check($price, $guess1, $guess2, $guess3, $guess4){
		$listResult = $this->Game->doCheckWinner($price, $guess1, $guess2, $guess3, $guess4);
		print_r($listResult);
		exit;
	}
	
	public function test(){
		$list = array();
		$list[0][0] = '00';
		$list[0][1] = '01';
		$list[0][2] = '02';
		$list[1][0] = '10';
		$list[1][1] = '11';
		$list[1][2] = '12';
		
		$array = array(
			array(6,3,2,7,8,1,9,4,5),
			array(4,8,7,5,9,6,2,1,3),
			array(5,1,9,2,4,3,8,7,6),
			array(8,6,4,3,5,2,7,9,1),
			array(7,5,1,9,6,8,3,2,4),
			array(2,9,3,1,7,4,6,5,8),
			array(9,4,5,6,3,7,1,8,2),
			array(1,7,6,8,2,5,4,3,9),
			array(3,2,8,4,1,9,5,6,7)
		);
		
		$initialArray = array(
		
				array(4,3,5,2,6,9,7,8,1),
		
				array(6,8,2,5,7,1,4,9,3),
		
				array(1,9,7,8,3,4,5,6,2),
		
				array(8,2,6,1,9,5,3,4,7),
		
				array(3,7,4,6,8,2,9,1,5),
		
				array(9,5,1,7,4,3,6,2,8),
		
				array(5,1,9,3,2,6,8,7,4),
		
				array(2,4,8,9,5,7,1,3,6),
		
				array(7,6,3,4,1,8,2,5,9)
		
		);
		
		
// 		print_r($array);
		$start = microtime(true);
		
		
		$result = $this->Sudoku2->getArrays($array);
// 		$this->line(" +++ Time excute all process: " . (microtime(true) - $start) . " +++");
		print_r(microtime(true) - $start);
		exit;
	}
}